/*
 * TestLogging.java
 *
 * Created on September 13, 2006, 9:39 PM
 *
 * To change this template, choose Tools | Template Manager
 * and open the template in the editor.
 */

package smfbackup;

import smfbackup.conf.Configuration;
import smfbackup.conf.Forum;

/**
 *
 * @author Iulian
 */
public class TestLogging extends Thread {
    
    MainWindow listener;
    
    /** Creates a new instance of TestLogging */
    public TestLogging(MainWindow listener) {
        this.listener = listener;
    }
    
    public void run() {
        for (int i = 0; i < 100; i++) {
            for (int j = 0; j < Configuration.getForumsDefined().size(); j++) {
                Forum f = (Forum)Configuration.getForumsDefined().elementAt(j);
                f.updateStatus("Forum " + j + " at moment " + i);
            }
            
            try {
                listener.fireLogUpdate();
                Thread.sleep(150);
            } catch (InterruptedException ex) {
                ex.printStackTrace();
            }
        }
    }
}
